from ui.client1.test_gui_base import Ui_MainWindowBase, test_gui_base # 原ui

# from ui.ClientUi.Main_ui import MainWindow # 新标准ui 20250103
from ui.ClientUi.SpecialMainWindow import SpecialMainWindow

class UiFactory: #
    @staticmethod
    def create(class_type, **kwargs):
        if class_type == "main":
            return Ui_MainWindowBase(engine=kwargs.get('engine', None),
                                     ui_config=kwargs.get('ui_config', {})
                                     ) # 外部通过信号-槽函数与UI模块通讯
            # return test_gui_base

        elif class_type == "client_format":
            return SpecialMainWindow(engine=kwargs.get('engine', None),
                                     ui_config=kwargs.get('ui_config', {}),
                                     app=kwargs.get('app', None),)
        else:
            raise ValueError("Invalid transport type")
